package top.yonyong.mynacos.configcenter.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import top.yonyong.mynacos.configcenter.pojo.ConfigInfo;

import java.util.List;

/**
 * @Describtion repository
 * @Author yonyong
 * @Date 2020/7/6 10:05
 * @Version 1.0.0
 **/
@Repository
public interface ConfigRepository extends JpaRepository<ConfigInfo,Long>{
    /**
     * queryAllByKeyAndGroupOrderByUpdateTime
     * @param key
     * @param group
     * @return List
     */
    List<ConfigInfo> queryAllByKeyAndGroupOrderByUpdateTime(String key,String group);

    /**
     * queryAllByGroupOrderByUpdateTime
     * @param group
     * @return List
     */
    List<ConfigInfo> queryAllByGroupOrderByUpdateTime(String group);
}
